package com.zjj.service.impl;

import com.zjj.mapper.UserMapper;
import com.zjj.pojo.entity.User;
import com.zjj.pojo.vo.UserVo;
import com.zjj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public List<UserVo> getUserList(String name, Integer gender) {
        return userMapper.getUserList(name, gender);
    }

    @Override
    public List<UserVo> getUserInfo(Integer id) {
        return userMapper.getUserInfo(id);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public int deleteUser(Integer id) {
        return userMapper.deleteUser(id);
    }
}
